package com.ddkj.netty.server;

import io.netty.channel.Channel;

import java.io.Serializable;

/**
 * 地址信息
 */
public class TCPAddress implements Serializable {

    private String clientIP;//ip
    private Channel channel;//channel

    public TCPAddress() {
    }

    public TCPAddress(Channel channel) {
        this.channel = channel;
        this.clientIP = channel.remoteAddress().toString().substring(1);
    }

    public TCPAddress(String clientIP, Channel channel) {
        this.clientIP = clientIP;
        this.channel = channel;
    }

    public String getClientIP() {
        return clientIP;
    }

    public void setClientIP(String clientIP) {
        this.clientIP = clientIP;
    }

    public Channel getChannel() {
        return channel;
    }

    public void setChannel(Channel channel) {
        this.channel = channel;
    }


}
